<!DOCTYPE html>

<html lang="en" data-content_root="./">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>Migrations &#8212; Eclipse paho-mqtt  documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=12dfc556" />
    <script src="_static/documentation_options.js?v=5929fcd5"></script>
    <script src="_static/doctools.js?v=9a2dae69"></script>
    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="Changelog" href="changelog.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  

  
  

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <section id="migrations">
<h1>Migrations<a class="headerlink" href="#migrations" title="Link to this heading">¶</a></h1>
<section id="change-between-version-1-x-and-2-0">
<h2>Change between version 1.x and 2.0<a class="headerlink" href="#change-between-version-1-x-and-2-0" title="Link to this heading">¶</a></h2>
<p>Most breaking change should break loudly and should not be missed. The
most significant one which affect everyone is the versioned user callbacks.
Other breaking change might not effect your usage of paho-mqtt.</p>
<p>The list of breaking change (detailed below) are:</p>
<ul class="simple">
<li><p>Add version to user callbacks (on_publish, on_connect…).
tl; dr: add <code class="docutils literal notranslate"><span class="pre">mqtt.CallbackAPIVersion.VERSION1</span></code> as first argument to <a class="reference internal" href="client.html#paho.mqtt.client.Client" title="paho.mqtt.client.Client"><code class="xref any py py-class docutils literal notranslate"><span class="pre">Client()</span></code></a></p></li>
<li><p>Drop support for older Python.</p></li>
<li><p>Dropped some deprecated and no used argument or method. If you used them, you can just drop them.</p></li>
<li><p>Removed from public interface few function/class</p></li>
<li><p>Renamed ReasonCodes to ReasonCode</p></li>
<li><p>Improved typing which resulted in few type change. It might no affect you, see below for detail.</p></li>
<li><p>Fixed connect_srv, which changed its signature.</p></li>
<li><p>Added new properties, which could conflict with sub-class</p></li>
</ul>
<section id="versioned-the-user-callbacks">
<h3>Versioned the user callbacks<a class="headerlink" href="#versioned-the-user-callbacks" title="Link to this heading">¶</a></h3>
<p>Version 2.0 of paho-mqtt introduced versioning of the user-callback. To fix some inconsistency in callback
arguments and to provide better support for MQTTv5, version 2.0 changed the arguments passed to the user-callback.</p>
<p>You can still use the old version of the callback, you are just required to tell paho-mqtt that you opt for this
version. For that just change your client creation from:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD code</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">mqttc</span> <span class="o">=</span> <span class="n">mqtt</span><span class="o">.</span><span class="n">Client</span><span class="p">()</span>
</pre></div>
</div>
<p>to:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># NEW code</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">mqttc</span> <span class="o">=</span> <span class="n">mqtt</span><span class="o">.</span><span class="n">Client</span><span class="p">(</span><span class="n">mqtt</span><span class="o">.</span><span class="n">CallbackAPIVersion</span><span class="o">.</span><span class="n">VERSION1</span><span class="p">)</span>
</pre></div>
</div>
<p>That’s it, the remaining of the code can stay unchanged.</p>
<p>Version 1 of the callback is deprecated, but is still supported in version 2.x. If you want to upgrade to the newer version of the API callback, you will need to update your callbacks:</p>
<section id="on-connect">
<h4>on_connect<a class="headerlink" href="#on-connect" title="Link to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD code for MQTTv3</span>
<span class="k">def</span> <span class="nf">on_connect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">flags</span><span class="p">,</span> <span class="n">rc</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">flags</span><span class="p">[</span><span class="s2">&quot;session present&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
        <span class="c1"># ...</span>
    <span class="k">if</span> <span class="n">rc</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># success connect</span>
    <span class="k">if</span> <span class="n">rc</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># error processing</span>

<span class="c1"># OLD code for MQTTv5</span>
<span class="k">def</span> <span class="nf">on_connect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">flags</span><span class="p">,</span> <span class="n">reason_code</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">flags</span><span class="p">[</span><span class="s2">&quot;session present&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
        <span class="c1"># ...</span>
    <span class="k">if</span> <span class="n">reason_code</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># success connect</span>

<span class="c1"># NEW code for both version</span>
<span class="k">def</span> <span class="nf">on_connect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">flags</span><span class="p">,</span> <span class="n">reason_code</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">flags</span><span class="o">.</span><span class="n">session_present</span><span class="p">:</span>
        <span class="c1"># ...</span>
    <span class="k">if</span> <span class="n">reason_code</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># success connect</span>
    <span class="k">if</span> <span class="n">reason_code</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># error processing</span>
</pre></div>
</div>
<p>Be careful that for MQTTv3, <code class="docutils literal notranslate"><span class="pre">rc</span></code> (an integer) changed to <code class="docutils literal notranslate"><span class="pre">reason_code</span></code> (an instance of <a class="reference internal" href="types.html#paho.mqtt.reasoncodes.ReasonCode" title="paho.mqtt.reasoncodes.ReasonCode"><code class="xref any py py-class docutils literal notranslate"><span class="pre">ReasonCode</span></code></a>), and the numeric value changed.
The numeric value 0 means success for both, so as in above example, using <code class="docutils literal notranslate"><span class="pre">reason_code</span> <span class="pre">==</span> <span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">reason_code</span> <span class="pre">!=</span> <span class="pre">0</span></code> or other comparison with zero
is fine.
But if you had comparison with other value, you will need to update the code. It’s recommended to compare to string value:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD code for MQTTv3</span>
<span class="k">def</span> <span class="nf">on_connect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">flags</span><span class="p">,</span> <span class="n">rc</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">rc</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
        <span class="c1"># handle bad protocol version</span>
    <span class="k">if</span> <span class="n">rc</span> <span class="o">==</span> <span class="n">CONNACK_REFUSED_IDENTIFIER_REJECTED</span><span class="p">:</span>
        <span class="c1"># handle bad identifier</span>

<span class="c1"># NEW code</span>
<span class="k">def</span> <span class="nf">on_connect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">flags</span><span class="p">,</span> <span class="n">reason_code</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">reason_code</span> <span class="o">==</span> <span class="s2">&quot;Unsupported protocol version&quot;</span><span class="p">:</span>
        <span class="c1"># handle bad protocol version</span>
    <span class="k">if</span> <span class="n">reason_code</span> <span class="o">==</span> <span class="s2">&quot;Client identifier not valid&quot;</span><span class="p">:</span>
        <span class="c1"># handle bad identifier</span>
</pre></div>
</div>
</section>
<section id="on-disconnect">
<h4>on_disconnect<a class="headerlink" href="#on-disconnect" title="Link to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD code for MQTTv3</span>
<span class="k">def</span> <span class="nf">on_disconnect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">rc</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">rc</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># success disconnect</span>
    <span class="k">if</span> <span class="n">rc</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># error processing</span>

<span class="c1"># OLD code for MQTTv5</span>
<span class="k">def</span> <span class="nf">on_disconnect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">reason_code</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">reason_code</span><span class="p">:</span>
        <span class="c1"># error processing</span>

<span class="c1"># NEW code for both version</span>
<span class="k">def</span> <span class="nf">on_disconnect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">flags</span><span class="p">,</span> <span class="n">reason_code</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">reason_code</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># success disconnect</span>
    <span class="k">if</span> <span class="n">reason_code</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
        <span class="c1"># error processing</span>
</pre></div>
</div>
</section>
<section id="on-subscribe">
<h4>on_subscribe<a class="headerlink" href="#on-subscribe" title="Link to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD code for MQTTv3</span>
<span class="k">def</span> <span class="nf">on_subscribe</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">,</span> <span class="n">granted_qos</span><span class="p">):</span>
    <span class="k">for</span> <span class="n">sub_result</span> <span class="ow">in</span> <span class="n">granted_qos</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">sub_result</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
            <span class="c1"># process QoS == 1</span>
        <span class="k">if</span> <span class="n">sub_result</span> <span class="o">==</span> <span class="mh">0x80</span><span class="p">:</span>
            <span class="c1"># error processing</span>

<span class="c1"># OLD code for MQTTv5</span>
<span class="k">def</span> <span class="nf">on_disconnect</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">,</span> <span class="n">reason_codes</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="k">for</span> <span class="n">sub_result</span> <span class="ow">in</span> <span class="n">reason_codes</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">sub_result</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
            <span class="c1"># process QoS == 1</span>
        <span class="c1"># Any reason code &gt;= 128 is a failure.</span>
        <span class="k">if</span> <span class="n">sub_result</span> <span class="o">&gt;=</span> <span class="mi">128</span><span class="p">:</span>
            <span class="c1"># error processing</span>

<span class="c1"># NEW code for both version</span>
<span class="k">def</span> <span class="nf">on_subscribe</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">,</span> <span class="n">reason_codes</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="k">for</span> <span class="n">sub_result</span> <span class="ow">in</span> <span class="n">reason_codes</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">sub_result</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
            <span class="c1"># process QoS == 1</span>
        <span class="c1"># Any reason code &gt;= 128 is a failure.</span>
        <span class="k">if</span> <span class="n">sub_result</span> <span class="o">&gt;=</span> <span class="mi">128</span><span class="p">:</span>
            <span class="c1"># error processing</span>
</pre></div>
</div>
</section>
<section id="on-unsubscribe">
<h4>on_unsubscribe<a class="headerlink" href="#on-unsubscribe" title="Link to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD code for MQTTv3</span>
<span class="k">def</span> <span class="nf">on_unsubscribe</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">):</span>
    <span class="c1"># ...</span>

<span class="c1"># OLD code for MQTTv5</span>
<span class="k">def</span> <span class="nf">on_unsubscribe</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">,</span> <span class="n">properties</span><span class="p">,</span> <span class="n">reason_codes</span><span class="p">):</span>
    <span class="c1"># In OLD version, reason_codes could be a list or a single ReasonCode object</span>
    <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">reason_codes</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
        <span class="k">for</span> <span class="n">unsub_result</span> <span class="ow">in</span> <span class="n">reason_codes</span><span class="p">:</span>
            <span class="c1"># Any reason code &gt;= 128 is a failure.</span>
            <span class="k">if</span> <span class="n">reason_codes</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="mi">128</span><span class="p">:</span>
                <span class="c1"># error processing</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="c1"># Any reason code &gt;= 128 is a failure.</span>
        <span class="k">if</span> <span class="n">reason_codes</span> <span class="o">&gt;</span> <span class="mi">128</span><span class="p">:</span>
            <span class="c1"># error processing</span>


<span class="c1"># NEW code for both version</span>
<span class="k">def</span> <span class="nf">on_subscribe</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">,</span> <span class="n">reason_codes</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="c1"># In NEW version, reason_codes is always a list. Empty for MQTTv3</span>
    <span class="k">for</span> <span class="n">unsub_result</span> <span class="ow">in</span> <span class="n">reason_codes</span><span class="p">:</span>
        <span class="c1"># Any reason code &gt;= 128 is a failure.</span>
        <span class="k">if</span> <span class="n">reason_codes</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="mi">128</span><span class="p">:</span>
            <span class="c1"># error processing</span>
</pre></div>
</div>
</section>
<section id="on-publish">
<h4>on_publish<a class="headerlink" href="#on-publish" title="Link to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD code</span>
<span class="k">def</span> <span class="nf">on_publish</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">):</span>
    <span class="c1"># ...</span>


<span class="c1"># NEW code</span>
<span class="k">def</span> <span class="nf">on_publish</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">mid</span><span class="p">,</span> <span class="n">reason_codes</span><span class="p">,</span> <span class="n">properties</span><span class="p">):</span>
    <span class="c1"># ...</span>
</pre></div>
</div>
</section>
<section id="on-message">
<h4>on_message<a class="headerlink" href="#on-message" title="Link to this heading">¶</a></h4>
<p>No change for this callback:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># OLD &amp; NEW code</span>
<span class="k">def</span> <span class="nf">on_message</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">userdata</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
    <span class="c1"># ...</span>
</pre></div>
</div>
</section>
</section>
<section id="drop-support-for-older-python">
<h3>Drop support for older Python<a class="headerlink" href="#drop-support-for-older-python" title="Link to this heading">¶</a></h3>
<p>paho-mqtt support Python 3.7 to 3.12. If you are using an older Python version, including
Python 2.x you will need to kept running the 1.x version of paho-mqtt.</p>
</section>
<section id="drop-deprecated-argument-and-method">
<h3>Drop deprecated argument and method<a class="headerlink" href="#drop-deprecated-argument-and-method" title="Link to this heading">¶</a></h3>
<p>The following are dropped:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">max_packets</span></code> argument in <a class="reference internal" href="client.html#paho.mqtt.client.Client.loop" title="paho.mqtt.client.Client.loop"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">loop()</span></code></a>, <a class="reference internal" href="client.html#paho.mqtt.client.Client.loop_write" title="paho.mqtt.client.Client.loop_write"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">loop_write()</span></code></a> and <a class="reference internal" href="client.html#paho.mqtt.client.Client.loop_forever" title="paho.mqtt.client.Client.loop_forever"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">loop_forever()</span></code></a> is removed</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">force</span></code> argument in <a class="reference internal" href="client.html#paho.mqtt.client.Client.loop_stop" title="paho.mqtt.client.Client.loop_stop"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">loop_stop()</span></code></a> is removed</p></li>
<li><p>method <code class="docutils literal notranslate"><span class="pre">message_retry_set()</span></code> is removed</p></li>
</ul>
<p>They were not used in previous version, so you can just remove them if you used them.</p>
</section>
<section id="stop-exposing-private-function-class">
<h3>Stop exposing private function/class<a class="headerlink" href="#stop-exposing-private-function-class" title="Link to this heading">¶</a></h3>
<p>Some private function or class are not longer exposed. The following are removed:</p>
<ul class="simple">
<li><p>function base62</p></li>
<li><p>class WebsocketWrapper</p></li>
<li><p>enum ConnectionState</p></li>
</ul>
</section>
<section id="renamed-reasoncodes-to-reasoncode">
<h3>Renamed ReasonCodes to ReasonCode<a class="headerlink" href="#renamed-reasoncodes-to-reasoncode" title="Link to this heading">¶</a></h3>
<p>The class ReasonCodes that was used to represent one reason code response from
broker or generated by the library is now named <a class="reference internal" href="types.html#paho.mqtt.reasoncodes.ReasonCode" title="paho.mqtt.reasoncodes.ReasonCode"><code class="xref any py py-class docutils literal notranslate"><span class="pre">ReasonCode</span></code></a>.</p>
<p>This should work without any change as ReasonCodes (plural, the old name) is still
present but deprecated.</p>
</section>
<section id="improved-typing">
<h3>Improved typing<a class="headerlink" href="#improved-typing" title="Link to this heading">¶</a></h3>
<p>Version 2.0 improved typing, but this would be compatible with existing code.
The most likely issue are some integer that are now better type, like <a class="reference internal" href="client.html#paho.mqtt.client.MQTTMessage.dup" title="paho.mqtt.client.MQTTMessage.dup"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">dup</span></code></a> on MQTTMessage.</p>
<p>That means that code that used <code class="docutils literal notranslate"><span class="pre">if</span> <span class="pre">msg.dup</span> <span class="pre">==</span> <span class="pre">1:</span></code> will need to be change to <code class="docutils literal notranslate"><span class="pre">if</span> <span class="pre">msg.dup:</span></code> (the later version
for with both paho-mqtt 1.x and 2.0).</p>
</section>
<section id="fix-connect-srv">
<h3>Fix connect_srv<a class="headerlink" href="#fix-connect-srv" title="Link to this heading">¶</a></h3>
<p><a class="reference internal" href="client.html#paho.mqtt.client.Client.connect_srv" title="paho.mqtt.client.Client.connect_srv"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">connect_srv()</span></code></a> didn’t took the same argument as <a class="reference internal" href="client.html#paho.mqtt.client.Client.connect" title="paho.mqtt.client.Client.connect"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">connect()</span></code></a>. Fixed this, which means the signaure
changed. But since connect_srv was broken in previous version, this should not have any negative impact.</p>
</section>
<section id="added-new-properties">
<h3>Added new properties<a class="headerlink" href="#added-new-properties" title="Link to this heading">¶</a></h3>
<p>The Client class added few new properties. If you are using a sub-class of Client and also defined a
attribute, method or properties with the same name, it will conflict.</p>
<p>The added properties are:</p>
<ul class="simple">
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.host" title="paho.mqtt.client.Client.host"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">host</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.port" title="paho.mqtt.client.Client.port"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">port</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.keepalive" title="paho.mqtt.client.Client.keepalive"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">keepalive</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.transport" title="paho.mqtt.client.Client.transport"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">transport</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.protocol" title="paho.mqtt.client.Client.protocol"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">protocol</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.connect_timeout" title="paho.mqtt.client.Client.connect_timeout"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">connect_timeout</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.username" title="paho.mqtt.client.Client.username"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">username</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.password" title="paho.mqtt.client.Client.password"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">password</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.max_inflight_messages" title="paho.mqtt.client.Client.max_inflight_messages"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">max_inflight_messages</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.max_queued_messages" title="paho.mqtt.client.Client.max_queued_messages"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">max_queued_messages</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.will_topic" title="paho.mqtt.client.Client.will_topic"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">will_topic</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.will_payload" title="paho.mqtt.client.Client.will_payload"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">will_payload</span></code></a></p></li>
<li><p><a class="reference internal" href="client.html#paho.mqtt.client.Client.logger" title="paho.mqtt.client.Client.logger"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">logger</span></code></a></p></li>
</ul>
</section>
</section>
</section>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">Eclipse paho-mqtt</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="client.html">client module</a></li>
<li class="toctree-l1"><a class="reference internal" href="helpers.html">helpers</a></li>
<li class="toctree-l1"><a class="reference internal" href="types.html">Types and enums</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Migrations</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#change-between-version-1-x-and-2-0">Change between version 1.x and 2.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#versioned-the-user-callbacks">Versioned the user callbacks</a></li>
<li class="toctree-l3"><a class="reference internal" href="#drop-support-for-older-python">Drop support for older Python</a></li>
<li class="toctree-l3"><a class="reference internal" href="#drop-deprecated-argument-and-method">Drop deprecated argument and method</a></li>
<li class="toctree-l3"><a class="reference internal" href="#stop-exposing-private-function-class">Stop exposing private function/class</a></li>
<li class="toctree-l3"><a class="reference internal" href="#renamed-reasoncodes-to-reasoncode">Renamed ReasonCodes to ReasonCode</a></li>
<li class="toctree-l3"><a class="reference internal" href="#improved-typing">Improved typing</a></li>
<li class="toctree-l3"><a class="reference internal" href="#fix-connect-srv">Fix connect_srv</a></li>
<li class="toctree-l3"><a class="reference internal" href="#added-new-properties">Added new properties</a></li>
</ul>
</li>
</ul>
</li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="changelog.html" title="previous chapter">Changelog</a></li>
  </ul></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &#169;2024, Eclipse.
      
      |
      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.3.7</a>
      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
      
      |
      <a href="_sources/migrations.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>